import { defineComponent } from 'vue'
import { FormatAlignRightRound } from '@vicons/material'
import { NIcon } from 'naive-ui'

export default defineComponent({
  name: 'AppHamburger',
  props: {
    isActive: {
      type: Boolean,
      default: false
    }
  },
  emits: ['toggle'],
  setup(props, context) {
    return {
      toggle() {
        context.emit('toggle')
      }
    }
  },
  render() {
    return (
      <div onClick={this.toggle} class={['app-hamburger', { 'app-hamburger--is-active': this.isActive }]}>
        <NIcon size={20}>
          <FormatAlignRightRound />
        </NIcon>
      </div>
    )
  }
})
